package ooday03.practise.practise_01;

public class Dog extends Animal implements Fuctional {
    public Dog(){

    }
    public Dog(String name,int age,String color){
        super(name, age, color);
    }

    public void lookHome(){
        System.out.println(getColor()+"的"+getAge()+"岁的狗狗"+getName()+"在看家");
    }
    @Override
    public void eat(){
        System.out.println(getColor()+"的"+getAge()+"岁的狗狗"+getName()+"在吃骨头");
    }

    @Override
    public void swim() {
        System.out.println(getColor()+"的"+getAge()+"岁的狗狗"+getName()+"会游泳");
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + getName() + '\'' +
                ", age=" + getAge() +
                ", color='" + getColor() + '\'' +
                '}';
    }
}
